<?php

class Cache extends MY_Controller
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        $this->assign("keys", CommonEnum::MEMCACHE_KEYS);
        $this->display("tool/cache.tpl");
    }

    public function get()
    {
        $key = $this->getParams()['key'];
        $result = $this->cache->memcached->get($key);
        json($result);
    }

    public function del()
    {
        $key = $this->getParams()['key'];
        $this->cache->memcached->delete($key);
        json("成功");
    }
}